home *** CD-ROM | disk | FTP | other *** search
/ CICA 1993 April / CICA MS Windows - April 1993.iso / unzipped / programr / listings / blxv1 / ttime.cpp < prev    next >
Text File  |  1991-01-22  |  291b  |  14 lines

  1. #include<time.h>
  2. #include<iostream.h>
  3. struct tm *time(void);
  4. void main(void) {
  5.     time_t ttime = time(NULL);
  6.     struct tm *ltime = time();
  7.     cout << ctime(&ttime);
  8.     cout << asctime(ltime);
  9. }
  10. struct tm *time(void) {
  11.     time_t t = time(NULL);
  12.     return localtime(&t);
  13. }
  14.